const ojb = {
    store: ['foo', 'bar', 'baz'],
    [Symbol.iterator]: function () {
        let index = 0;
        const self = this;
        return {
            next: function () {
                const result = {
                    value: self.store[index],
                    done: index >= self.store.length
                };
                index++;
                return result;
            }
        }
    }
}


for (const item of ojb) {
    console.log('循环', item);
}